package com.gxa.finance.controller;

import com.gxa.common.commons.R;
import com.gxa.finance.pojo.FinancePayment;
import com.gxa.finance.service.FinancePaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/finance/payment")
public class FinancePaymentController {
    @Autowired
    private FinancePaymentService financePaymentService;
    //分页查询预付款审核接口
    @GetMapping("/payPage")
    public R payPage(Integer currentPage,Integer pageSize){
        //返回查出来的数据
        R r = financePaymentService.payPage(currentPage, pageSize);
        return r;
    }

    //人工判断预审核通过操作接口
    @PostMapping("/audit")
    public R audit(FinancePayment financePayment){
        //返回查出来的数据
        R audit = financePaymentService.audit(financePayment);
        return audit;
    }

    // 人工判断预审核未通过操作接口
        @PostMapping("/noAudit")
        public R noAudit(FinancePayment financePayment){
           //返回查出来的数据
            R noAudit = financePaymentService.noAudit(financePayment);
            return noAudit;
       }

}
